package com.hzqy.persistence.dao.statistics;

import com.hzqy.persistence.dao.core.PersistenceDao;
import com.hzqy.web.vo.statistics.ListenUvAndPvVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public class ListenUvAndPvDao extends PersistenceDao<ListenUvAndPvVo, Integer>{
	protected final Logger LOG = LoggerFactory.getLogger(ListenUvAndPvDao.class);

	/**
	 * 根据条件统计查询PV和UV数量
	 * @param map
	 * @return
	 */
	public int selectListenUvAndPvCount(Map<String, Object> map) {
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace+"selectListenUvAndPvCount",map);
	}
	/**
	 * 根据条件统计查询PV和UV数据
	 * @param map
	 * @return
	 */
	public List<ListenUvAndPvVo> selectListenUvAndPvList(Map<String, Object> map) {
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectListenUvAndPvList", map);
	}

}
